<?php

declare(strict_types=1);
/**
 * This file is part of Hyperf.
 *
 * @link     https://www.hyperf.io
 * @document https://hyperf.wiki
 * @contact  group@hyperf.io
 * @license  https://github.com/hyperf/hyperf/blob/master/LICENSE
 */
return [
    'default' => [
        'driver'    => env('DB_DEFAULT_DRIVER', 'mysql'),
        'host'      => env('DB_DEFAULT_HOST', 'localhost'),
        'database'  => env('DB_DEFAULT_DATABASE', ''),
        'port'      => env('DB_DEFAULT_PORT', '3306'),
        'username'  => env('DB_DEFAULT_USERNAME', 'root'),
        'password'  => env('DB_DEFAULT_PASSWORD', '123456'),
        'charset'   => env('DB_CHARSET', 'utf8'),
        'collation' => env('DB_COLLATION', 'utf8_unicode_ci'),
        'prefix'    => env('DB_PREFIX', ''),
        'pool' => [
            'min_connections'   => 1,
            'max_connections'   => (int)(env('DB_PSS_MAX_CONNECTIONS',10)),
            'connect_timeout'   => 60.0,
            'wait_timeout'      => 30.0,
            'heartbeat'         => -1,
            'max_idle_time'     => (float) env('DB_MAX_IDLE_TIME', 60),
        ],
        'commands' => [
            'gen:model' => [
                'path'          => 'app/Model/PssModel',
                'force_casts'   => true,
                'inheritance'   => 'Model',
            ],
        ],
    ],
    'pss_log' => [
        'driver'    => env('DB_PSS_LOG_DRIVER', 'mysql'),
        'host'      => env('DB_PSS_LOG_HOST', 'localhost'),
        'database'  => env('DB_PSS_LOG_DATABASE', ''),
        'port'      => env('DB_PSS_LOG_PORT', '3306'),
        'username'  => env('DB_PSS_LOG_USERNAME', 'root'),
        'password'  => env('DB_PSS_LOG_PASSWORD', '123456'),
        'charset'   => env('DB_PSS_LOG_CHARSET', 'utf8'),
        'collation' => env('DB_PSS_LOG_COLLATION', 'utf8_unicode_ci'),
        'prefix'    => env('DB_PSS_LOG_PREFIX', ''),
        'pool' => [
            'min_connections'   => 1,
            'max_connections'   => (int)(env('DB_LOG_MAX_CONNECTIONS',10)),
            'connect_timeout'   => 60.0,
            'wait_timeout'      => 30.0,
            'heartbeat'         => -1,
            'max_idle_time'     => (float) env('DB_MAX_IDLE_TIME', 60),
        ],
        'commands' => [
            'gen:model' => [
                'path'          => 'app/Model/PssLogModel',
                'force_casts'   => true,
                'inheritance'   => 'Model',
            ],
        ],
    ],
    'net_commodity' => [
        'driver'    => env('DB_NET_COMMODITY_DRIVER', 'mysql'),
        'host'      => env('DB_NET_COMMODITY_HOST', 'localhost'),
        'database'  => env('DB_NET_COMMODITY_DATABASE', ''),
        'port'      => env('DB_NET_COMMODITY_PORT', '3306'),
        'username'  => env('DB_NET_COMMODITY_USERNAME', 'root'),
        'password'  => env('DB_NET_COMMODITY_PASSWORD', '123456'),
        'charset'   => env('DB_NET_COMMODITY_CHARSET', 'utf8'),
        'collation' => env('DB_NET_COMMODITY_COLLATION', 'utf8_unicode_ci'),
        'prefix'    => env('DB_NET_COMMODITY_PREFIX', ''),
        'pool' => [
            'min_connections'   => 1,
            'max_connections'   => (int)(env('DB_COMMODITY_MAX_CONNECTIONS',10)),
            'connect_timeout'   => 60.0,
            'wait_timeout'      => 30.0,
            'heartbeat'         => -1,
            'max_idle_time'     => (float) env('DB_MAX_IDLE_TIME', 60),
        ],
        'commands' => [
            'gen:model' => [
                'path'          => 'app/Model/CommodityModel',
                'force_casts'   => true,
                'inheritance'   => 'Model',
            ],
        ],
    ],
    'hm_commodity' => [
        'driver'    => env('DB_HM_COMMODITY_DRIVER', 'mysql'),
        'host'      => env('DB_HM_COMMODITY_HOST', ''),
        'database'  => env('DB_HM_COMMODITY_DATABASE', ''),
        'port'      => env('DB_HM_COMMODITY_PORT', ''),
        'username'  => env('DB_HM_COMMODITY_USERNAME', ''),
        'password'  => env('DB_HM_COMMODITY_PASSWORD', ''),
        'charset'   => env('DB_HM_COMMODITY_CHARSET', 'utf8'),
        'collation' => env('DB_HM_COMMODITY_COLLATION', 'utf8_unicode_ci'),
        'prefix'    => env('DB_HM_COMMODITY_PREFIX', ''),
        'pool' => [
            'min_connections'   => 1,
            'max_connections'   => (int)(env('DB_COMMODITY_MAX_CONNECTIONS',10)),
            'connect_timeout'   => 60.0,
            'wait_timeout'      => 30.0,
            'heartbeat'         => -1,
            'max_idle_time'     => (float) env('DB_MAX_IDLE_TIME', 60),
        ],
        'commands' => [
            'gen:model' => [
                'path'          => 'app/Model/HmCommodityModel',
                'force_casts'   => true,
                'inheritance'   => 'Model',
            ],
        ],
    ]
];
